package com.sxhuayuan.parking.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sxhuayuan.parking.dao.BaseDao;
import com.sxhuayuan.parking.dao.PartnerpayLogDao;
import com.sxhuayuan.parking.entity.PartnerpayLog;
import com.sxhuayuan.parking.service.PartnerpayLogService;

@Service("partnerpayLogServiceImpl")
public class PartnerpayLogServiceImpl extends BaseServiceImpl<PartnerpayLog, Long> implements PartnerpayLogService {

	@Autowired
	PartnerpayLogDao dao;

	@Override
	public BaseDao<PartnerpayLog, Long> getDAO() {
		return dao;
	}

	@Override
	public void saveLog(Long orderId, String orderSn, String carPlate, String errcode, String msg) {
		PartnerpayLog log = new PartnerpayLog();
		log.setCarPlate(carPlate);
		log.setErrcode(errcode);
		log.setMsg(msg);
		log.setOrderId(orderId);
		log.setOrderSn(orderSn);
		dao.save(log);
	}

	@Override
	public List<PartnerpayLog> findListByOrderId(Long orderId) {
		return dao.findListByOrderId(orderId);
	}

}
